﻿<!--#include file="h.asp"--><%
'
'	七色虎建站系统
'	广告跳转页面
'	2011.11.2

Sub main
	Dim rs,id,url,userid,rs_
	id=getN("id",1)
	userid=user_array(0)
	set rs=hu.conn("select top 1 url from 74hu_gogo where id="&id)
	if not (rs.bof and rs.eof) then
		url=noubburl(rs("url"))
		hu.conn("update 74hu_gogo set tid=tid+1 where id=" & id)
		If userid>0 Then
			Set rs_=hu.conn("select top 1 id from 74hu_transaction where userid="&userid&" and type=5 and subtype="&id&"")
			If rs_.eof Then
				hu.conn("insert into 74hu_transaction (userid,type,subtype) values("&userid&",5,"&id&")")
				Call setUserAmount(userid, amtAd)'加金币积分经验
			End If
			Set rs_=Nothing
		End If
	else
		url=""&http_path&"?aid=index&"&sid_str&""
	end if
	rs.close
	set rs=nothing
	hu.redirect nourl(url)
	'hu.AutoRedirect = noubburl(url)
End Sub

%>